<template>
  <div class="boxmem">
    <!-- 背景 -->
    <div class="bg">
      <!-- 头部 -->
      <div class="htear">
        <div class="left">
          <div
            @click="$router.go(-1)"
            class="return iconfont icon-arrowRight-copy-copy"
          ></div>
          <div class="name">会员等级</div>
        </div>
        <div class="right">
          <div class="searchcon iconfont icon-31sousuo"></div>
          <div
            is-link
            @click="showPopup"
            class="classification iconfont icon-a-gengduofenlei"
          ></div>
        </div>
      </div>
      <!-- 弹出内容 -->
      <van-popup
        closeable
        v-model="show"
        position="top"
        :style="{ height: '45%' }"
      >
        <div class="boxpopup">
          <!-- 头部 -->
          <div class="htears">
            <div class="left">
              <div
                @click="$router.go(-1)"
                class="return iconfont icon-arrowRight-copy-copy"
              ></div>
              <div class="name">会员等级</div>
            </div>
          </div>
          <!-- 分类 -->
          <div class="guide-nav">
            <div class="box">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-home-copy"></use>
              </svg>
              <div class="boxtext">首页</div>
            </div>
            <div class="box">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-fenlei"></use>
              </svg>
              <div>分类</div>
            </div>
            <div class="box">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-daochu1024-02"></use>
              </svg>
              <div>排行榜</div>
            </div>
            <div class="box">
              <svg class="icon" aria-hidden="true">
                <use
                  xlink:href="#icon-a-travelhotelholidayvacationcdlistingboo"
                ></use>
              </svg>
              <div>免费</div>
            </div>
            <div class="box">
              <svg class="icon sw" aria-hidden="true">
                <use xlink:href="#icon-wanjietuijian"></use>
              </svg>
              <div>完本</div>
            </div>
            <div class="box">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-huangguan"></use>
              </svg>
              <div>大神</div>
            </div>
          </div>
          <!-- 我的书架 -->
          <router-link tag="div" to="/bookshelf" class="mybookshelf">我的书架</router-link>
        </div>
      </van-popup>
      <!-- 头像 -->
      <div class="portrait">
        <div class="left">
          <div class="img">
            <img
              src="https://qidian.gtimg.com/qd/images/ico/default_user.0.2.png"
              alt=""
            />
          </div>
        </div>
        <div class="center">
          <div class="name">江户川胡芦娃</div>
          <div class="men">当前等级 <span>普通用户</span></div>
        </div>
        <div class="right">立即充值</div>
      </div>
      <!-- 提示 -->
      <div class="tpale">充值1元升级为普通会员</div>
      <div class="quarter">
        <ul>
          <li
            v-for="(item, index) in toppri"
            :key="index"
            :class="item.iconfont"
          ></li>
        </ul>
        <div>
          <span v-for="(item, index) in toppri" :key="index">
            {{ item.name }}
          </span>
        </div>
      </div>
    </div>
    <!-- 当前会员特权 -->
    <div class="privilege">
      <div>当前会员特权</div>
      <ul>
        <li>· 订阅5分/千字。</li>
      </ul>
    </div>
    <!-- 会员等级特权 -->
    <div class="privlists">
      <div class="toppri">会员等级特权</div>
      <ul>
        <li v-for="(item, index) in toppri" :key="index">
          <div class="name">
            <span :class="item.iconfont"></span>{{ item.name }}
          </div>
          <ul>
            <li v-for="(v, i) in item.toprrineax" :key="i">{{ v }}</li>
          </ul>
        </li>
      </ul>
    </div>
    <footers></footers>
  </div>
</template>

<script>
import footers from "../components/base/footers.vue";
export default {
  components: { footers },
  data() {
    return {
      //弹出判断
      show: false,
      // 会员特权列表
      toppri: [
        {
          name: "普通用户",
          toprrineax: ["· 订阅5分/千字。"],
          iconfont: ["iconfont", "icon-tx-liujiaoxingxing"],
        },
        {
          name: "普通会员",
          toprrineax: [
            "· 订阅5分/千字；",
            "· 订阅消费每满3000币，当月得月票1张。",
          ],
          iconfont: ["iconfont", "icon-tx-liujiaoxingxing", "blue"],
        },
        {
          name: "高级会员",
          toprrineax: [
            "· 原基础上，每日获取得推荐票+1张；",
            "· 订阅消费满1000币，下月得保底月票1张；",
            "· 订阅消费每满2000币，当月得订阅月票1张。",
          ],
          iconfont: ["iconfont", "icon-tx-liujiaoxingxing", "red"],
        },
        {
          name: "初级VIP",
          toprrineax: [
            "· 订阅8折，4分/千字；",
            "· 原基础上，每日获取得推荐票+1张；",
            "· 订阅消费满1000币，下月得保底月票2张；",
            "· 订阅消费每满2000币，当月得订阅月票1张。",
          ],
          iconfont: ["iconfont", "icon-zuanshi", "darkm"],
        },
        {
          name: "高级VIP",
          toprrineax: [
            "· 订阅6折，3分/千字；",
            "· 原基础上，每日获取得推荐票+1张；",
            "· 订阅消费满1000币，下月得保底月票3张；",
            "· 订阅消费每满2000币，当月得订阅月票1张。",
          ],
          iconfont: ["iconfont", "icon-huangguan", "agenta"],
        },
      ],
    };
  },
  methods: {
    //头部弹出
    showPopup() {
      this.show = true;
    },
  },
};
</script>

<style lang="less">
.boxmem {
  .bg {
    font-size: 14px;
    overflow: hidden;
    min-height: 160px;
    text-align: center;
    color: #fff;
    background: #a72cdf
      url(https://qidian.gtimg.com/qdm/img/level-header-bg.0493f.jpg) no-repeat
      center;
    background-size: cover;
    // 关闭按钮
    .van-popup__close-icon--top-right {
      top: 13px;
    }
    .boxpopup {
      .htears {
        width: 100%;
        display: flex;
        height: 22px;
        padding: 11px 0px 10px 0px;
        justify-content: space-between;
        align-items: center;
        .age {
          display: flex;
          height: 24px;
          border: 1px solid #ed424b;
          border-radius: 3px;
          div {
            font-size: 15px;
            line-height: 24px;
            color: #ed424b;
            padding: 0px 10px;
          }
          .com {
            background: #ed424b;
            color: white;
          }
        }
        .left,
        .right {
          display: flex;
          div {
            padding: 0px 10px;
            text-align: center;
            font-size: 18px;
            color: #3c3b3b;
          }
          .name {
            font-size: 14px;
            color: #424141;
          }
          .return {
            color: black;
          }
        }
      }
      .guide-nav {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 0px 16px;
        .box {
          width: 58px;
          height: 58px;
          line-height: 58px;
          text-align: center;
          margin: 12px 24px;
          color: #33373d;
          font-size: 12px;
          font-weight: 600;
          div {
            position: relative;
            top: -33px;
            font-size: 14px;
          }
        }
      }
      .mybookshelf {
        margin: 20px 50px;
        text-align: center;
        padding: 8px 0px;
        font-size: 14px;
        color: white;
        font-weight: 500;
        background-color: #ed424b;
        border-radius: 20px;
      }
      .sw {
        font-size: 40px;
      }
    }
    .htear {
      width: 100%;
      display: flex;
      height: 22px;
      padding: 11px 0px 10px 0px;
      justify-content: space-between;
      align-items: center;
      .left,
      .right {
        display: flex;
        div {
          padding: 0px 10px;
          text-align: center;
          font-size: 18px;
          color: #fff;
        }
        .name {
          font-size: 14px;
          color: #fff;
        }
        .return {
          color: #fff;
        }
      }
      .age {
        display: flex;
        height: 24px;
        border: 1px solid #ed424b;
        border-radius: 3px;
        div {
          font-size: 15px;
          line-height: 24px;
          color: #ed424b;
          padding: 0px 10px;
        }
        .com {
          background: #ed424b;
          color: white;
        }
      }
    }
    .hot {
      width: calc(100% - 30px);
      padding: 0px 15px;
      background: white;
      margin-bottom: 12px;
      .hotnav {
        padding: 15px 0px;
        display: flex;
        align-items: center;
        padding-bottom: 20px;
        position: relative;
        .div {
          font-size: 16px;
          font-weight: 600;
          padding: 0px 9px;
          border-left: 2px solid red;
          color: #33373d;
        }
        span {
          color: #969ba3;
          font-size: 13px;
          margin-left: 8px;
        }
        .more {
          font-size: 14px;
          color: #a4a8c3;
          border: 0px;
          position: absolute;
          top: 15px;
          right: 0px;
        }
      }

      .swiper-container-02 {
        max-width: 345px;
        overflow: hidden;
        .swiper-wrapper {
          display: flex;
        }
      }
      .content {
        width: 100%;
        padding-bottom: 15px;
        .item {
          width: 66px;
          .img {
            width: 66px;
            height: 88px;

            img {
              width: 100%;
              height: 100%;
            }
          }
          .text {
            width: 66px;
            overflow: hidden;
            font-size: 13px;
            max-height: 36px;
            color: #3a3939;
            margin: 5px 0px;
          }
          .name {
            font-size: 12px;
            color: #969ba3;
            height: 12px;
            width: 66px;
            line-height: 12px;
            overflow: hidden;
          }
        }
      }
      .author {
        width: 100%;
        height: 85px;
        display: flex;
        position: relative;
        background-color: white;
        .topimg {
          width: 48px;
          height: 48px;
          position: relative;
          margin-right: 12px;
          padding: 16px 0px;
          img {
            width: 100%;
            border-radius: 50%;
          }
          span {
            position: absolute;
            bottom: 16px;
            left: 5px;
            font-size: 12px;
            color: white;
            background-color: #b3a7ff;
            padding: 0px 7px 0px 7px;
            border-radius: 8px;
            border-top: 1px solid white;
            border-left: 1px solid white;
            border-right: 1px solid white;
          }
        }
        .authorname {
          padding: 16px 0px;
          flex: 1;
          border-top: 1px solid whitesmoke;
          .name {
            color: #33373d;
            font-size: 16px;
            overflow: hidden;
            font-weight: 600;
            white-space: nowrap;
            margin-bottom: 5px;
          }
          .introduce {
            margin-top: 10px;
            font-size: 14px;
            width: 259px;
            color: #a8a7a9;
            height: 16px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
          }
        }
        .more {
          position: absolute;
          right: 16px;
          top: calc(85px / 2 - 16px / 2);
          margin: auto;
        }
      }
    }
    .portrait {
      margin-top: 4px;
      width: calc(100% - 20px);
      display: flex;
      align-items: center;
      padding: 5px 10px;
      background-color: #ffffff14;
      margin-bottom: 12px;
      .left {
        margin-right: 12px;
        .img {
          width: 40px;
          height: 40px;
          vertical-align: bottom;
          border: 1px solid rgba(255, 255, 255, 0.4);
          border-radius: 50%;
          img {
            width: 100%;
            height: 100%;
          }
        }
      }
      .center {
        display: flex;
        width: 213px;
        flex-direction: column;
        align-items: flex-start;
        .name {
          font-size: 16px;
          color: white;
          font-weight: 600;
        }
        .men {
          font-size: 12px;
          color: #bbb;
        }
      }
      .right {
        font-size: 12px;
        color: white;
        margin-left: 10px;
        padding: 5px 15px;
        border-radius: 15px;
        background-color: #d762ff;
      }
    }
    .tpale {
      width: calc(100% - 12px);
      padding-left: 12px;
      display: flex;
      font-size: 12px;
      color: white;
    }
    .quarter {
      width: 100%;
      padding: 10px 0px;
      margin-top: 12px;
      ul {
        display: flex;
        align-items: center;
        justify-content: center;
        li {
          font-size: 14px;
          color: white;
          border: 3px solid white;
          padding: 1px;
          background-color: #73db00;
          border-radius: 50%;
          margin: 0px 27px;
        }
        .darkm {
          background-color: #c671ff;
        }
        .agenta {
          background-color: #ff6e00;
        }
        .blue {
          background-color: #7ab9ff;
        }
        .red {
          background-color: #ff6a72;
        }
      }
      div {
         display: flex;
        align-items: center;
        justify-content: space-between;
        span {
          width: 72px;
          font-size: 12px;
          padding-top: 5px;
          color: white;
          transform: scale(0.9);
          margin: 0px 0px;
        }
      }
    }
  }
  .privilege {
    width: calc(100% - 12px);
    padding-left: 12px;
    background-color: white;
    margin-bottom: 12px;
    div {
      padding: 12px 0px;
      font-size: 14px;
      color: #33373d;
      font-weight: 600;
      border-bottom: 1px solid #f3f3f3;
    }
    ul {
      li {
        padding: 12px 0px;
        font-size: 14px;
        color: #33373d;
      }
    }
  }
  .privlists {
    width: calc(100% - 12px);
    padding-left: 12px;
    background-color: white;
    margin-bottom: 12px;
    .toppri {
      padding: 12px 0px;
      font-size: 14px;
      color: #33373d;
      font-weight: 600;
      border-bottom: 1px solid #f3f3f3;
    }
    ul {
      li {
        .name {
          font-size: 14px;
          color: #33373d;
          font-weight: 600;
          margin-bottom: 7px;
          .iconfont {
            font-size: 12px;
            color: white;
            padding: 1px;
            background-color: #73db00;
            border-radius: 50%;
            margin-right: 5px;
          }
          .darkm {
            background-color: #c671ff;
          }
          .agenta {
            background-color: #ff6e00;
          }
          .blue {
            background-color: #7ab9ff;
          }
          .red {
            background-color: #ff6a72;
          }
        }
        padding: 12px 0px;
        font-size: 14px;
        border-bottom: 1px solid #f3f3f3;
        color: #33373d;
        li {
          border-bottom: 0px;
          padding: 5px 0px;
        }
      }
    }
  }
}
</style>